package com.tianyuchan.exception.enums;

/**
 * @Classname : ContractManageErrorCode
 * @Description : 合同管理业务错误码枚举
 * @Author : cty
 * @Date 2023/3/19 19:38
 */


public enum ContractManageErrorCode implements ExplicableErrorCode {

    /**
     * 合同金额为负
     */
    CONTRACT_AMOUNT_IS_NEGATIVE("contract amount (%s) is negative"),

    /**
     * 付款金额大于合同金额
     */
    PAY_AMOUNT_IS_GREATER_THAN_CONTRACT_AMOUNT("pay amount (%s) is greater than contract amount (%s)");


    private String msg;

    ContractManageErrorCode(String msg) {
        this.msg = msg;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    @Override
    public String getCode() {
        return this.name();
    }
}
